From 012a1dc35c69cb51ff15b21f8303787b5299a626 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Sat, 12 Sep 2026 10:58:39 +0200 Subject: improve projects layout on mobile --- .../routine/[routineId]/+page.server.ts | 5 ++ .../[projectId]/routine/[routineId]/+page.svelte | 55 ++++++++++++++++++++-- 2 files changed, 56 insertions(+), 4 deletions(-) (limited to 'src/routes/projects/[projectId]') diff --git a/src/routes/projects/[projectId]/routine/[routineId]/+page.server.ts b/src/routes/projects/[projectId]/routine/[routineId]/+page.server.ts index bdfa452..891a7b6 100644 --- a/src/routes/projects/[projectId]/routine/[routineId]/+page.server.ts +++ b/src/routes/projects/[projectId]/routine/[routineId]/+page.server.ts @@ -2,6 +2,7 @@ import { error } from '@sveltejs/kit'; import { getById } from '$lib/server/services/projects'; import { loadCurrent, loadCompletions } from '$lib/server/services/routines'; import { + archiveRoutineAction, completeRoutineAction, editRoutineAction, } from '$lib/server/services/routine-actions'; @@ -49,4 +50,8 @@ export const actions: Actions = { const data = await request.formData(); return completeRoutineAction(data, numericId(params.routineId)); }, + + archive: async ({ params }) => { + return archiveRoutineAction(numericId(params.routineId)); + }, }; diff --git a/src/routes/projects/[projectId]/routine/[routineId]/+page.svelte b/src/routes/projects/[projectId]/routine/[routineId]/+page.svelte index e593ad1..74880cb 100644 --- a/src/routes/projects/[projectId]/routine/[routineId]/+page.svelte +++ b/src/routes/projects/[projectId]/routine/[routineId]/+page.svelte @@ -103,7 +103,7 @@ class="form-input desc" name="description" bind:value={description} - rows={3} + rows={6} placeholder="Pourquoi, comment, quand..." autocomplete="off" > @@ -112,13 +112,15 @@

Intervalle invalide — ex : 1d, 2w, 3m, 1y

{/if} -

✓ Enregistré

{/if} @@ -188,6 +190,14 @@ {#if data.completions.length === 0}

Aucune réalisation pour l'instant.

{/if} + + {#if !data.routine.archived} + + {/if} -- cgit v1.3